<?php

namespace App\View\Components;

use App\Models\Warranty;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\DB;
use Illuminate\View\Component;

class WarrantyImageDemo extends Component
{
    /**
     * Create a new component instance.
     *
     * @return void
     */
    public function __construct(Request $request)
    {
        $this->images = [];
    }

    /**
     * Get the view / contents that represent the component.
     *
     * @return \Illuminate\View\View|string
     */
    public function render()
    {
        $images = $this->getImages();

        return view('components.warranty-image-demo', [
            'images' => $images,
        ]);
    }

    public function getImages()
    {
        $images = [
            'gUk3vCf9FZZC0Adoz66mvOZFmkzueG.png',
            'TsieG7AOu8G1YrK6upS7ALTULSqQlf.png',
            '3pcjzKcOXveq9bAqum5GLJVdNkDcpM.png',
            'N8egGi40X5i9tduC2X7lvIQbU2bJjd.png',
            'Uhb7F1WCU7DoIL9T8OCYlvJNqCQsZk.png',
            'q009O0wtRernr9ETLD33FeMwamK21d.png',
            //'q009O0wtRernr9ETLDlPXk2PQMwamK.png'
        ];
        $res = [];
        foreach ($images as $k => $v) {
            $res[] = getInstallPicture($v);
        }
        return $res;
    }
}
